-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix favorites #3138
Fix favorites #3138
Conversation
lucasbordeau
commented
Dec 22, 2023
- Use new object record CRUD with favorites
- Fixed minor bugs in object record CRUD optimistic rendering
packages/twenty-front/src/modules/object-metadata/utils/getObjectRecordIdentifier.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/object-record/utils/sanitizeRecordInput.ts
Outdated
Show resolved
Hide resolved
The optimistic rendering is not working when adding a favorite. Enregistrement.de.l.ecran.2024-01-02.a.14.55.29.mov |
packages/twenty-front/src/modules/apollo/optimistic-effect/hooks/useOptimisticEffect.ts
Show resolved
Hide resolved
const currentWorkspaceMember = useRecoilValue(currentWorkspaceMemberState); | ||
|
||
const [favorites, setFavorites] = useRecoilState(favoritesState); | ||
const favoriteObjectNameSingular = 'favorite'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel we could introduce an enum here for all standard objects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that you already have one: StandardObjectNameSingular
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's in another PR
packages/twenty-front/src/modules/favorites/hooks/useFavorites.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/object-metadata/utils/isStandardObject.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!